cmake_minimum_required(VERSION 3.5)
project(server)

INCLUDE_DIRECTORIES(
        /usr/local/opt/openssl/include
        /usr/local/Cellar/json-c/0.12/include/json-c
        /usr/local/Cellar/mariadb-connector-c/2.2.2/include/mariadb/
        /usr/local/include/mariadb/
)

link_directories (
        /usr/local/opt/openssl/lib
        /usr/local/Cellar/json-c/0.12/lib
        /usr/local/Cellar/mariadb-connector-c/2.2.2/lib/mariadb/
        /usr/local/lib/mariadb/
)

link_libraries(ssl crypto json-c mysqlclient mariadbclient)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES
    Makefile
    README.md
    server.c)
add_executable(server ${SOURCE_FILES})